<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="test">
			<!--<input type="text" v-model='name' />-->
			<input type="text" id="bbb" />
			<input type="file" id="file_test" style="display: none;" v-on:change="Test($event)" />
			<button @click="ClickFilesss()" id="aaa">点击上传文件</button>
		</div> 
		<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
		<script src="vue.min.js"></script>
		<script type="text/javascript">
			new Vue({
				el:'#test',				
				methods:{
					ClickFilesss:function(){
						document.getElementById('file_test').click()
					},
					Test:function(event){
						var dom = event.target
						console.log(event.target)
						var fileNmae = getFileName(dom.value)
						console.log(fileName)
						var  formData = new FormData();  
        				formData.append('file', dom.files[0]);
        				this.$http.post("lst",formData,{emulateJSON:true}).then(response=>{
							console.log(response.data)					
							var res = response.data;
							if(response.status== 200){
								console.log(res.result)
								this.userList = res.result
								this.page_total = res.page_total					
							}
						});
					}
				}
			})
			
			var str="Hell\\o\world!"
			var pos = str.indexOf("\\")
			var fileName = str.substring(pos+1)
			document.getElementById('aaa').innerText = 'aaa'
			document.getElementById('bbb').value = 'eeea'
		</script>
	</body>
</html>
